<template>
  <el-header>
    <div class="hL">
      <img src="../../assets/newimg/logo.png" style="width: 100%; height: 100%" />
    </div>
    <div class="hR">
      <el-menu :default-active="activeIndex" mode="horizontal" @select="handleSelect" :ellipsis="false"
        style="height: 70px; margin-left: 10px" router>
        <el-menu-item index="/">
          <el-icon>
            <img src="../../assets/img/home.png" class="i_icon" />
          </el-icon>
          <span style="color: #000 !important">首页</span>
        </el-menu-item>

        <el-menu-item index="/search">
          <el-icon>
            <img src="../../assets/img/路径 33@2x.png" class="i_icon" />
          </el-icon>
          <span style="color: #000 !important">搜索</span>
        </el-menu-item>
        <el-menu-item index="/head">
          <el-icon>
            <img src="../../assets/img/路径 4087@2x.png" class="i_icon" />
          </el-icon>
          <span style="color: #000 !important">工作台</span>
        </el-menu-item>
      </el-menu>
    </div>
  </el-header>
  <el-container>
    <el-aside width="150px">  
      <!-- 侧边栏 -->
      <el-menu default-active="2" class="el-menu-vertical-demo" router :collapse="isCollapse"
        :collapse-transition="false" :unique-opened="true" background-color="#1C294C" text-color="#fff">
        <!-- 首页 -->
        <el-menu-item index="/header">
          <template #title>
            <img src="../../assets/newimg/icon/组 5960@2x.png" style="width: 0.875rem; height: 0.875rem" />
            <span class="ml4">首页</span>
          </template>
        </el-menu-item>

        <!-- 医械通 -->
        <el-menu-item index="/doctor">
          <template #title>
            <img src="../../assets/newimg/icon/路径 4585@2x.png" style="width: 0.875rem; height: 0.875rem" />
            <span class="ml4">医械通</span>
          </template>
        </el-menu-item>

        <!-- 商机 -->
        <el-menu-item index="/business">
          <template #title>
            <img src="../../assets/newimg/icon/路径 4586@2x.png" style="width: 0.875rem; height: 0.875rem" />
            <span class="ml4">商机</span>
          </template>
        </el-menu-item>

        <!-- 分析 -->
        <el-menu-item index="/analysis">
          <template #title>
            <img src="../../assets/newimg/icon/组 5961@2x.png" style="width: 0.875rem; height: 0.875rem" />
            <span class="ml4">分析</span>
          </template>
        </el-menu-item>

        <!-- 数据 -->
        <el-menu-item index="/data">
          <template #title>
            <img src="../../assets/newimg/icon/路径 4588@2x.png" style="width: 0.875rem; height: 0.875rem" />
            <span class="ml4">数据</span>
          </template>
        </el-menu-item>

        <!-- 服务 -->
        <el-menu-item index="/give">
          <template #title>
            <img src="../../assets/newimg/icon/组 5961@2x.png" style="width: 0.875rem; height: 0.875rem" />
            <span class="ml4">服务</span>
          </template>
        </el-menu-item>

        <!-- 资产 -->
        <el-menu-item index="/means">
          <template #title>
            <img src="../../assets/newimg/icon/路径 4589@2x.png" style="width: 0.875rem; height: 0.875rem" />
            <span class="ml4">资产</span>
          </template>
        </el-menu-item>

        <!-- 设置 -->
        <el-menu-item index="/setup">
          <template #title>
            <img src="../../assets/newimg/icon/路径 4590@2x.png" style="width: 0.875rem; height: 0.875rem" />
            <span class="ml4">设置</span>
          </template>
        </el-menu-item>
      </el-menu>
    </el-aside>
    <el-container>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script lang="ts" setup>
import { h, ref } from "vue";
const isCollapse = ref(false);
</script>

<style lang="scss" scoped>
.el-header {
  margin: 0;
  padding: 0;
  // background-color: #eef0f6;
  color: #333;
  height: 4.375rem;
  display: flex;

  .hL {
    background-color: #fff;
    width: 9.375rem;
    height: 4.375rem;
  }

  .hR {}
}

.el-aside {
  background-color: #1c294c;
  color: #333;
  height: calc(100vh - 4.375rem);
}

.el-main {
  background-color: #ecf5ff;
  color: #333;
  height: calc(100vh - 4rem);
  padding: 0;
  margin: 0;
}
</style>
